package com.myjavalab.thinkinginjava4;

import com.myjavalab.util.PrintUtil;

public class Beetle extends Insect {

	private int k = printInit(" Beetle.k initialized");
	
	public Beetle() {
		PrintUtil.prt("k = " + k);
		PrintUtil.prt("j = " + j);
		
	}
	
	private static int x2 = printInit("static Beetle.x2 initialized");

	public static void main(String[] args) {
		PrintUtil.prt("Beetle constructor");
//		Beetle b = new Beetle();
	}
}

class Insect {
	private int i = printInit("Insect.i initialized");
	protected int j;
	
	Insect() {
		PrintUtil.prt("i = " + i + ", j = " + j);
		j = 39;
	}
	
	private static int x1 = printInit("static Insect.x1 initialized");
	
	static int printInit(String s) {
		PrintUtil.prt(s);
		return 40;
	}
}